package meiyunting.shiwuzhaoling.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;
import java.util.Map;

/**
 * 校园二手交易服务客户端
 */
@FeignClient(name = "market-service", fallback = MarketServiceClientFallback.class)
public interface MarketServiceClient {
    
    /**
     * 获取用户发布的商品
     * @param userId 用户ID
     * @return 商品列表
     */
    @GetMapping("/api/products/user/{userId}")
    List<Map<String, Object>> getUserProducts(@PathVariable("userId") Long userId);
} 